
from bs4 import BeautifulSoup
from urllib.request import urlopen
import re
import os

f = open('D:/pyHome/trans/zybj_1.html', 'r', encoding="utf-8")
html = f.read()
f.close()
# if has Chinese, apply decode()
# html = urlopen("https://list.youku.com/albumlist/show/id_5713741.html?").read().decode('utf-8')

soup = BeautifulSoup(html, features='lxml')


all_div = soup.find_all('div',{"class":"p-thumb"})
mySet = set()
for div in all_div:
    str1 = str(div)
    thisDiv = BeautifulSoup(str1)
    thisDiv = thisDiv.find('a', {'href': re.compile('//v.youku.com/v_show/*')})
    mySet.add(thisDiv["href"])

mylist = []
for l in mySet:
    mylist.append('you-get https:'+l)
for c in mylist:
    print(c)
    os.system(c)

print('download done')